echo 'removing platforms'
cordova platform rm ios
cordova platform rm android
cordova platform add ios
cordova platform add android@6.1.2

echo 'Restore platforms is complete'

echo 'Restoring Plugins'

cordova plugin add submodules/ionic-plugin-keyboard --nofetch
cordova plugin add submodules/cordova-plugin-device --nofetch
cordova plugin add submodules/cordova-plugin-whitelist --nofetch
cordova plugin add submodules/cordova-plugin-splashscreen --nofetch
cordova plugin add submodules/cordova-plugin-wechat --variable WECHATAPPID="wx37a002141ed67779" --nofetch
cordova plugin add submodules/BarcodeScanner --nofetch
cordova plugin add submodules/ios9-cordova --nofetch
cordova plugin add submodules/ionic-ios10 --nofetch
cordova plugin add submodules/cordova-amap --variable ARD_API_KEY="3308be4dfd4576409ed5f6c6c9be96d7" --variable IOS_API_KEY="4720f71130725653ce8e5aae4f3d41ab" --nofetch
cordova plugin add submodules/cordova-jpush --variable API_KEY="93e409cdb56f9c2b1c1143ec" --nofetch
cordova plugin add submodules/ygj-ZSPankPay --nofetch
cordova plugin add submodules/cordova-plugin-inappbrowser --nofetch
cordova plugin add submodules/cordova-qdc-wxpay --nofetch
cordova plugin add submodules/cordova-plugin-alipay/ --variable PARTNER_ID="a2016091901922621" --nofetch
cordova plugin add submodules/cordova-plugin-ummobclick --nofetch
cordova plugin add submodules/ionic-deploy --variable APP_ID="ygj-customer" --variable DEPLOY_SERVER="https://www.yueguanjia.com/hot-deploy" --nofetch
cordova plugin add submodules/geetest-cordova --nofetch
echo 'Restoring Plugins sucess'
